package com.threeti.mecool.core.application.report;

import java.io.Serializable;

import com.threeti.mecool.core.util.BigDecimalUtil;

/**
 * (督导)任务执行率
 * 
 * @author Jay Meng
 */
public class TaskPerformanceRate implements Serializable {
  private String adminDivAreaName;
  private String adminDivAreaCode;
  private int plannedQuantityOfTask;
  private int actualQuantityOfTask;
  
  public TaskPerformanceRate(String adminDivAreaCode, int plannedQuantityOfTask, int actualQuantityOfTask) {
    super();
    this.adminDivAreaCode = adminDivAreaCode;
    this.plannedQuantityOfTask = plannedQuantityOfTask;
    this.actualQuantityOfTask = actualQuantityOfTask;
  }

  public TaskPerformanceRate(String adminDivAreaName, String adminDivAreaCode, int plannedQuantityOfTask,
      int actualQuantityOfTask) {
    this(adminDivAreaCode, plannedQuantityOfTask, actualQuantityOfTask);
    this.adminDivAreaName = adminDivAreaName;
  }

  public String getAdminDivAreaName() {
    return adminDivAreaName;
  }

  public String getAdminDivAreaCode() {
    return adminDivAreaCode;
  }

  public int getPlannedQuantityOfTask() {
    return plannedQuantityOfTask;
  }

  public int getActualQuantityOfTask() {
    return actualQuantityOfTask;
  }

  public String getPercentValueFormatted() {
    return BigDecimalUtil.percentFormattedValueOf(actualQuantityOfTask, plannedQuantityOfTask);
  }

  public int getPercentIntValue() {
    return BigDecimalUtil.percentIntValueOf(actualQuantityOfTask, plannedQuantityOfTask);
  }
  
  public TaskPerformanceRate() {
    super();
  }

  @Override
  public String toString() {
    return "StoreOpenRate [adminDivAreaName=" + adminDivAreaName + ", adminDivAreaCode=" + adminDivAreaCode
        + ", plannedQuantityOfTask=" + plannedQuantityOfTask + ", actualQuantityOfTask="
        + actualQuantityOfTask + "]";
  }

  public void setAdminDivAreaName(String adminDivAreaName) {
    this.adminDivAreaName = adminDivAreaName;
  }

  public void setAdminDivAreaCode(String adminDivAreaCode) {
    this.adminDivAreaCode = adminDivAreaCode;
  }

  public void setPlannedQuantityOfTask(int plannedQuantityOfTask) {
    this.plannedQuantityOfTask = plannedQuantityOfTask;
  }

  public void setActualQuantityOfTask(int actualQuantityOfTask) {
    this.actualQuantityOfTask = actualQuantityOfTask;
  }
  
}
